This invention relates to an image processing apparatus and method for reading the image of a document by an image sensor and electrically processing the image.
The operation of an image processing apparatus according to the prior art will be described with reference to FIGS. 6 and 7. In order to store a shading waveform for a shading correction before reading one page of a document image, a pre-scanning operation for reading a white background (a reference white background) is performed within the apparatus.
More specifically, an analog switch 14p in the circuit shown in FIG. 7 is closed by an ABC (automatic background control) range signal 33 so that a video signal 11 enters the (+) input terminal of a comparator 15p. Meanwhile, since an analog switch 35p is set to a P side (the side of a peak-value signal 20p) by a switch changeover signal 36p, the held peak-value signal 20p is entering the (-) input terminal of the comparator 15p. If, as a result of comparing these signals, it is found that the video signal is greater than the peak-value signal, an analog switch 18p closes so that a peak-hold capacitor 16p is charged via a charging resistor 17p. The peak-value signal 20p rises as a result. Conversely if the video signal is less than the peak-value signal, the analog switch 18p remains open and the peak-value signal 20p does not change. As a result, the peak-value signal 20p eventually coincides with the peak value of the video signal 11p.
The peak-value signal 20p is transmitted to the other circuit elements via a buffer amplifier 21p. Specifically, a comparator 28p compares the video signal 11p entering its (+) input terminal with a reference signal 32p entering its (-) input terminal. If the video signal is greater than the reference signal, a memory write-data signal 29p at the output of the comparator 28p rises to the "1" (high) logic level. Conversely, if the video signal is less than the reference signal, the memory write-data signal 29p at the output of the comparator 28p falls to the "0" (low) logic level.
In this pre-scanning mode, the memory write-data signal 29p outputted by the comparator 28p is written in a shading memory 30p in response to a memory control signal 34p and, at the same time, is outputted as a memory readout-data signal 31p. As a result, if the memory readout-data signal 31p is at logical "1" (high), an analog switch 24p closes and an analog switch 25p opens. The video-peak signal 20p charges a shading capacitor 22p via the buffer amplifier 21p and a charging resistor 23. Conversely, if the memory readout-data signal 31p is at logical "0" (low), the analog switch 24p opens, the analog switch 25p closes and the shading capacitor 22p discharges via a discharge resistor 27p.
By repeating the charging and discharging of the shading capacitor 22p in the manner described above, a signal waveform in which the video signal waveform of the line presently being read is approximated by the charging/discharging characteristic of the shading capacitor 22p appears on the reference signal 32p and, at the same time, data (shading data) relating to this charging and discharging accumulate in the shading memory 30p. Since the charging of the peak value in the peak-hold capacitor 16p usually takes time, the foregoing pre-scanning operation is repeated over several lines to obtain the shading data. Though it is possible to back up the shading memory 30p, the fact that the shading memory is not connected to the data bus of the overall system means that an MPU 10p cannot access the memory directly. Consequently, the memory cannot be provided with protection.
FIGS. 8A and 8B are diagrams schematically showing an operation for obtaining a shading waveform, which takes into account a variance in the amount of light of the reading light source and a variance in the sensitivity of the reading sensor, by the conventional pre-scanning of white background (reference white background). FIG. 8A illustrates the white background and FIG. 8B the shading waveform.
After the above-described pre-scanning operation is carried out, a transition is made to an operation for reading the actual image of the document. More specifically, the ABC range signal 33p closes the analog switch 14p within the ABC range with respect to the width of the document. Here it is assumed that the analog switch 14p is closed during the reading of the document by reason of the fact that the width of the document is equal to the ABC range.
Accordingly, the video signal 11p reaches the (+) input terminal of the comparator 15p. At reading of the document, the analog switch 35p is set to the R side (the side of the reference signal 32p) by the switch changeover signal 36p so that reference signal 32p enters the (-) input terminal of the comparator 15p. Operation is such that the video signal 11p and reference signal 32p coincide owing to the switching of the analog switch 18p, in a manner similar to that described above, based upon the comparison of the two signals applied to the comparator 15p.
Meanwhile, shading correction data already accumulated is read out of the shading memory 30p every reading line in sync with the line by the memory control signal 34p, the analog switches 24p, 25p are switched in accordance with the "1" (high), "0" (low) logic of the shading data, and the shading waveform obtained at the time of pre-scanning is reproduced on the reference signal 32p by the charging and discharging of the shading capacitor 22p.
The reference signal 32p thus obtained enters the reference (REF) input terminal of an A/D converter 8p in FIG. 6. The video signal 11p, on the other hand, enters the analog (Vin) input terminal of the A/D converter 8p. As a result, accurate binary image data corrected for shading are obtained and the data are applied to a reading controller 9p.
Accordingly, in case of a document in which portions a and b are black information, as shown in FIG. 9A, the reference signal 32p prevailing when the document is read becomes a waveform having a curve along peak value of the video signal 11p, as illustrated in FIG. 9B. If 60% of the crest value of reference signal 32p is adopted as the slice level in the reading controller 9p of FIG. 6, then, in case of the document of FIG. 9A in which portions a and b are black information, the portions a, b will be lower than the slice level, as depicted in FIG. 9C, and will be judged to be portions of black information.
The above-described operation for reading one line is repeated in the sub-scan (line) direction, whereby one page is read.
In the conventional apparatus described above, the reading processing mechanism for the pre-scanning of the white background (reference white background) is provided within the apparatus. This results in a complicated arrangement within the apparatus and detracts from the reliability with which the document is passed through the apparatus (e.g., in the reliability of the ADF, or automatic document feeder). In addition, in an image processing apparatus of the type in which shading data obtained by a single pre-scanning operation are stored in the shading memory 30p and the shading data are used permanently in subsequent processing, a normal halftone image will not be obtained in the event that the internal data of the shading memory 30p are destroyed by an abnormal voltage (e.g., a lightning surge, a built-up of static electricity, etc.).